package assess

import (
	"gitcode.com/G-YT/iHealth25/server/global"
	"gitcode.com/G-YT/iHealth25/server/model/user"
	"time"
)

type Item struct {
	Key string `json:"key"`
	Msg string `json:"msg"`
}

type PhysiqueQuestionLog struct {
	global.GVA_MODEL
	BloodType                string     `json:"blood_type" gorm:"column:blood_type;comment:血型;default:没有填写;"`
	BloodSugar               string     `json:"blood_sugar" gorm:"column:blood_sugar;comment:血糖;default:0;"`
	HRV                      string     `json:"HRV" gorm:"column:HRV;comment:HRV指数;default:0;"`
	BloodConcentration       string     `json:"blood_concentration" gorm:"column:blood_concentration;comment:血氧浓度;default:0;"`
	HRres                    string     `json:"HRres" gorm:"column:HRres;comment:心率;default:0;"`
	BloodConcentrationLowNum string     `json:"blood_concentration_low_num" gorm:"column:blood_concentration_low_num;comment:最近一天的血氧小于97%的次数"`
	LowTension               string     `json:"low_tension" gorm:"column:low_tension;comment:低压"`
	HighTension              string     `json:"high_tension" gorm:"column:high_tension;comment:高压"`
	Birthday                 time.Time  `json:"birthday" gorm:"column:birthday;comment:生日"`
	Results                  string     `json:"results" gorm:"column:results;comment:问卷答案结果集"`
	ScoreData                string     `json:"score_data" gorm:"column:score_data;comment:得分结果集"`
	Physique                 string     `json:"habitus" gorm:"column:habitus;comment:体质"`
	PhysiqueId               uint       `json:"physique_id" gorm:"column:physique_id;comment:体质ID"`
	Uid                      uint       `json:"uid" gorm:"column:uid;comment:用户ID"`
	User                     *user.User `json:"User" gorm:"foreignKey:Uid;references:ID"`
	Remark                   string     `json:"remark" gorm:"column:remark;comment:备注"`
	Ph                       string     `json:"ph" gorm:"column:ph;comment:既往慢病史;default:无;"`
	Mah                      string     `json:"mah" gorm:"column:mah;comment:药物过敏史;default:无;"`
	Phi                      string     `json:"phi" gorm:"column:phi;comment:现病史;default:无;"`
	Sh                       string     `json:"sh" gorm:"column:sh;comment:手术史;default:无;"`
	Hs                       *bool      `json:"hs" gorm:"column:hs;comment:心脏支架 1有 0无;default:0"`
	Pacemaker                *bool      `json:"pacemaker" gorm:"column:pacemaker;comment:心脏起搏器 1有 0无;default:0"`
	Other                    string     `json:"other" gorm:"column:other;comment:其他;default:无"`
}

type UserPhysique struct {
	Physique string
	Score    string
}

func (PhysiqueQuestionLog) TableName() string {
	return "fd_physique_question_log"
}
